package com.dingding.special.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.dingding.common.core.base.controller.BaseController;
import com.dingding.common.core.base.dto.ResponseEntity;
import com.dingding.facade.user.dto.common.driver.ReqSyncDriverAuthStateDTO;
import com.dingding.facade.user.dto.common.driver.ResSyncDriverAuthStateDTO;
import com.dingding.facade.user.facade.common.driver.IDriverFacade;

/**
 * 
* @ClassName: DriverController
* @Description: 同步车主认证状态
* @author ligang
* @date 2016年12月5日 下午3:46:12
*
 */
@Controller
@RequestMapping("/authorapi/driver")
public class DriverController extends BaseController{

	@Resource(name = "driverFacade")
	private IDriverFacade driverFacade;
	
	@RequestMapping(value="/v1/syncDriverAuthState", method = { RequestMethod.POST })
	public void syncDriverAuth(HttpServletRequest request, HttpServletResponse response){
		
		ReqSyncDriverAuthStateDTO reqSyncDriverAuthStateDTO = super.getRequestBean(request, response, ReqSyncDriverAuthStateDTO.class);
		ResSyncDriverAuthStateDTO resSyncDriverAuthStateDTO = driverFacade.getResSyncDriverAuthState(reqSyncDriverAuthStateDTO);
		super.generateSuccessResponse(response, new ResponseEntity<ResSyncDriverAuthStateDTO>(), resSyncDriverAuthStateDTO);
		
	}
}











